{extend name='public/layer_base' /}

{block name="content"}
<style>
    .layui-upload-list img {
        height: 100px;
        width: 100px;
    }

    .layui-form-label {
        width: 200px !important;
    }

    .layui-input {
        width: 400px !important;
    }

    .layui-textarea {
        width: 400px !important;
    }
</style>
<div class="ok-body">
    <!--内容开始-->
    <section class="content">
        <!--数据表开始-->
        <form class="layui-form layui-form-pane ok-form" name="form-builder" method="{$form_method}"
            action="{$form_url}" {$submit_confirm ?='submit_confirm' }>
            <!---->
            {if $form_items}
            <div class="row">
                <div class="col-sm-12 col-xs-12">
                    <div class="box box-body">
                        <!---->
                        {volist name="form_items" id="form"}
                        {switch form.type}
                        {case value="hidden"}
                        {// 隐藏域 }
                        {include file="form_builder/items/hidden" type='' /}
                        {/case}
                        {case text}
                        {// 单行文本框 }
                        {include file="form_builder/items/text" type='' /}
                        {/case}
                        {case value="textarea"}
                        {// 多行文本框 }
                        {include file="form_builder/items/textarea" type='' /}
                        {/case}
                        {case value="radio"}
                        {// 单选 }
                        {include file="form_builder/items/radio" type='' /}
                        {/case}
                        {case value="checkbox"}
                        {// 多选 }
                        {include file="form_builder/items/checkbox" type='' /}
                        {/case}

                        {case value="select"}
                        {// 下拉菜单 }
                        {include file="form_builder/items/select" type='' /}
                        {/case}

                        {default /}

                        {/switch}
                        {/volist}
                        <!---->
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                {php}if(isset($btn_hide) && !in_array('submit', $btn_hide)):{/php}
                                <button class="layui-btn " lay-submit lay-filter="submit">{$btn_title['submit']|default='提
                                    交'}</button>
                                {php}endif;{/php}
                                {php}if(isset($btn_hide) && !in_array('back', $btn_hide)):{/php}

                                {php}endif;{/php}
                                {// 额外按钮}
                                {foreach $btn_extra as $key=>$vo }
                                {$vo|raw|default=''}
                                {/foreach}
                            </div>
                        </div>
                    </div>
                    <!-- /.box -->
                </div>
            </div>
            {else /}
            <div class="row">
                <div class="col-sm-12 col-xs-12">
                    <div class="box box-body">
                        {$empty_tips|raw}
                    </div>
                    <!-- /.box -->
                </div>
            </div>
            {/if}
        </form>

    </section>
</div>
{/block}
